package cn.echo.controller;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Created by Administrator on 2017/5/15.
 */
public class HelloController implements Controller {
    public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
        //接收请求参数用request.getParameter("");
          ModelAndView mv = new ModelAndView();
         mv.addObject("hello","hello spring mvc!");
        mv.setViewName("hello");
        return mv;
    }
}
